<form action="<?php echo base_url("index.php/user/updatetomodel")?>" method="post" enctype="multipart/form-data" name="loginform" id="loginform">
<input id="type" name ="type" type="hidden" value="3"/>
      <fieldset>
      <legend>Edit User Infomation</legend>
      <table class="nostyle" style="float:left">
        <tr>
          <td style="width:120px;">UserName:</td>
          <td><?php echo $name?><input name="id" type="hidden" value="<?php echo $uid?>" /></td>        
        </tr>
        <tr>
          <td style="width:120px;">PassWord:</td>
          <td><input name="password" type="text" id="password" /></td>
        </tr>
		<tr>
          <td style="width:120px;">Grade:</td>
          <td><select name="grade" id="grade" class="input-text"  >
            <option value="0" <?php if($type==0) echo "selected='selected'"?>>普通员工</option>
            <option value="1" <?php if($type==1) echo "selected='selected'"?>>高级员</option>
            <option value="4" <?php if($type==4) echo "selected='selected'"?>>管理员</option>
          </select></td>
        </tr>
        <tr>
          <td style="width:120px;">Department:</td>
		 
          <td> <select name="person" id="person" >
            <option value="1" <?php if($person==1) echo "selected='selected'"?>>Department1</option>
            <option value="2" <?php if($person==2) echo "selected='selected'"?>>Department2</option>
            <option value="3" <?php if($person==3) echo "selected='selected'"?>>Department3</option>
			<option value="4" <?php if($person==4) echo "selected='selected'"?>>Department4</option>
		  </select></td>
        </tr>
		<tr>
          <td style="width:120px;">Position:</td>
          <td><input name="post" type="text" id="post" value="<?php echo $post?>" /></td>
        </tr>
 		<tr>
          <td style="width:120px;">Age:</td>
          <td style="width:120px;"><input name="age" type="text" id="age" value="<?php echo $age?>"  /></td>
        </tr>
		<tr>
          <td style="width:120px;">Phone:</td>
          <td><input name="phone" type="text" id="phone" value="<?php echo $phone?>"  /></td>
        </tr>
		<tr>
          <td style="width:120px;">Email:</td>
          <td><input name="email" type="text" id="email" value="<?php echo $email?>" /></td>
        </tr>
		<tr>
          <td style="width:120px;">Pic</td>
          <td><input name="pic" type="file" id="pic" /></td>
        </tr>
		<tr>
          <td style="width:120px;">&nbsp;</td>
          <td>&nbsp;</td>
        </tr> 
        <tr>
          <td colspan="2" align="center" ><input type="submit" class="input-submit" value="Commit" /></td>
        </tr>
      </table>
      <?php if($pic){?>
              <img src="/<?php echo $pic?>" />
            <?php }?></td>
       
      </fieldset>

</form>
